-- GENERATED SPELL FOR [Pandemonius] --


function spell0_18341(pUnit, Event) --@Dark Shell,Self--
pUnit:FullCastSpellOnTarget(32358,pUnit)
pUnit:RegisterEvent('Sorts_18341', 7000, 1)
end

function spell1_18341(pUnit, Event) --@Dark Shell,Self--
pUnit:FullCastSpellOnTarget(38759,pUnit)
pUnit:RegisterEvent('Sorts_18341', 7000, 1)
end

function spell2_18341(pUnit, Event) --@Void Blast,n/a--
pUnit:FullCastSpellOnTarget(32325,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18341', 500, 1)
end

function spell3_18341(pUnit, Event) --@Void Blast,n/a--
pUnit:FullCastSpellOnTarget(38760,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18341', 500, 1)
end

function Sorts_18341(pUnit, Event)
local choix_sorts_18341 = math.random(0, 3)
if choix_sorts_18341 == 0 then
pUnit:RegisterEvent('spell0_18341', 1, 1)
end
if choix_sorts_18341 == 1 then
pUnit:RegisterEvent('spell1_18341', 1, 1)
end
if choix_sorts_18341 == 2 then
pUnit:RegisterEvent('spell2_18341', 1, 1)
end
if choix_sorts_18341 == 3 then
pUnit:RegisterEvent('spell3_18341', 1, 1)
end
end

function mob18341_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18341', math.random(1500, 3000), 1)
end

function mob18341_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18341_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18341_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18341, 1, 'mob18341_Action')
RegisterUnitEvent(18341, 2, 'mob18341_Leave')
RegisterUnitEvent(18341, 3, 'mob18341_Kill')
RegisterUnitEvent(18341, 4, 'mob18341_Die')
